.class public Lcom/xingbook/ui/a/f;
.super Lcom/xingbook/ui/a/c;

# interfaces
.implements Lcom/xingbook/ui/a/ac;


# annotations
.annotation build Landroid/annotation/SuppressLint;
    value = {
        "ViewConstructor"
    }
.end annotation


# instance fields
.field private n:Lcom/xingbook/ui/a/h;

.field private o:Landroid/view/SurfaceHolder;

.field private p:Landroid/hardware/Camera;

.field private q:Landroid/widget/ImageView;

.field private r:Landroid/widget/ImageView;

.field private s:Landroid/graphics/Bitmap;

.field private t:Ljava/lang/String;

.field private u:Landroid/graphics/Bitmap;

.field private v:Landroid/hardware/Camera$ShutterCallback;

.field private w:Landroid/hardware/Camera$PictureCallback;

.field private x:Landroid/hardware/Camera$PictureCallback;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/xingbook/ui/b/a;Lcn/a/a/b/b;Lcom/xingbook/c/e;)V
    .locals 3

    const/16 v2, 0x5f

    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, p3, p4}, Lcom/xingbook/ui/a/c;-><init>(Landroid/content/Context;Lcom/xingbook/ui/b/a;Lcn/a/a/b/b;Lcom/xingbook/c/e;)V

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->s:Landroid/graphics/Bitmap;

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->t:Ljava/lang/String;

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->v:Landroid/hardware/Camera$ShutterCallback;

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->w:Landroid/hardware/Camera$PictureCallback;

    new-instance v0, Lcom/xingbook/ui/a/g;

    invoke-direct {v0, p0}, Lcom/xingbook/ui/a/g;-><init>(Lcom/xingbook/ui/a/f;)V

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->x:Landroid/hardware/Camera$PictureCallback;

    new-instance v0, Ljava/lang/StringBuilder;

    sget-object v1, Lcom/xingbook/c/c;->u:Ljava/lang/String;

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {p1}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v1

    invoke-virtual {v1}, Lcom/xingbook/c/n;->h()Lcom/xingbook/d/a;

    move-result-object v1

    invoke-virtual {v1}, Lcom/xingbook/d/a;->s()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {p2}, Lcom/xingbook/ui/b/a;->getPage()Lcn/a/a/c/a;

    move-result-object v1

    invoke-virtual {v1}, Lcn/a/a/c/a;->l()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {p2}, Lcom/xingbook/ui/b/a;->getPage()Lcn/a/a/c/a;

    move-result-object v1

    invoke-virtual {v1}, Lcn/a/a/c/a;->k()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {p3}, Lcn/a/a/b/b;->j()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->t:Ljava/lang/String;

    invoke-direct {p0}, Lcom/xingbook/ui/a/f;->l()V

    return-void
.end method

.method static synthetic a(Lcom/xingbook/ui/a/f;)Landroid/graphics/Bitmap;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    return-object v0
.end method

.method static synthetic a(Lcom/xingbook/ui/a/f;Landroid/graphics/Bitmap;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    return-void
.end method

.method static synthetic a(Lcom/xingbook/ui/a/f;Landroid/hardware/Camera;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    return-void
.end method

.method static synthetic a(Lcom/xingbook/ui/a/f;Landroid/view/SurfaceHolder;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/ui/a/f;->o:Landroid/view/SurfaceHolder;

    return-void
.end method

.method static synthetic b(Lcom/xingbook/ui/a/f;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->t:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic c(Lcom/xingbook/ui/a/f;)V
    .locals 0

    invoke-direct {p0}, Lcom/xingbook/ui/a/f;->m()V

    return-void
.end method

.method static synthetic d(Lcom/xingbook/ui/a/f;)Landroid/view/SurfaceHolder;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->o:Landroid/view/SurfaceHolder;

    return-object v0
.end method

.method static synthetic e(Lcom/xingbook/ui/a/f;)Landroid/hardware/Camera;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    return-object v0
.end method

.method private getBitmap()Landroid/graphics/Bitmap;
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->t:Ljava/lang/String;

    if-eqz v0, :cond_1

    :try_start_0
    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->t:Ljava/lang/String;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->t:Ljava/lang/String;

    invoke-static {v0}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/xingbook/ui/a/f;->e:Landroid/content/Context;

    invoke-static {v0}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/c/n;->h()Lcom/xingbook/d/a;

    move-result-object v1

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->c:Lcn/a/a/b/b;

    check-cast v0, Lcn/a/a/b/d;

    invoke-virtual {v0}, Lcn/a/a/b/d;->a()I

    move-result v0

    invoke-virtual {v1, v0}, Lcom/xingbook/d/a;->j(I)Landroid/graphics/Bitmap;
    :try_end_0
    .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    goto :goto_0

    :catch_0
    move-exception v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private l()V
    .locals 6

    const/4 v3, 0x0

    new-instance v0, Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->e:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->r:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->r:Landroid/widget/ImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->r:Landroid/widget/ImageView;

    iget v1, p0, Lcom/xingbook/ui/a/f;->i:I

    iget v2, p0, Lcom/xingbook/ui/a/f;->h:I

    invoke-virtual {v0, v3, v3, v1, v2}, Landroid/widget/ImageView;->layout(IIII)V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->c:Lcn/a/a/b/b;

    check-cast v0, Lcn/a/a/b/d;

    invoke-virtual {v0}, Lcn/a/a/b/d;->l()Lcn/a/a/d/a;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->a:Lcom/xingbook/c/e;

    invoke-virtual {v1}, Lcom/xingbook/c/e;->b()Z

    move-result v1

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->a:Lcom/xingbook/c/e;

    invoke-virtual {v1, v0}, Lcom/xingbook/c/e;->a(Lcn/a/a/d/a;)Lcn/a/a/d/a;

    move-result-object v0

    :cond_0
    new-instance v1, Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/ui/a/f;->e:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/xingbook/ui/a/f;->q:Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->q:Landroid/widget/ImageView;

    iget v2, v0, Lcn/a/a/d/a;->c:I

    iget v3, v0, Lcn/a/a/d/a;->d:I

    iget v4, v0, Lcn/a/a/d/a;->a:I

    iget v5, v0, Lcn/a/a/d/a;->b:I

    invoke-virtual {v1, v2, v3, v4, v5}, Landroid/widget/ImageView;->layout(IIII)V

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->q:Landroid/widget/ImageView;

    sget-object v2, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    new-instance v1, Lcom/xingbook/ui/a/h;

    iget-object v2, p0, Lcom/xingbook/ui/a/f;->e:Landroid/content/Context;

    invoke-direct {v1, p0, v2}, Lcom/xingbook/ui/a/h;-><init>(Lcom/xingbook/ui/a/f;Landroid/content/Context;)V

    iput-object v1, p0, Lcom/xingbook/ui/a/f;->n:Lcom/xingbook/ui/a/h;

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->n:Lcom/xingbook/ui/a/h;

    iget v2, v0, Lcn/a/a/d/a;->c:I

    iget v3, v0, Lcn/a/a/d/a;->d:I

    iget v4, v0, Lcn/a/a/d/a;->a:I

    iget v0, v0, Lcn/a/a/d/a;->b:I

    invoke-virtual {v1, v2, v3, v4, v0}, Lcom/xingbook/ui/a/h;->layout(IIII)V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->n:Lcom/xingbook/ui/a/h;

    invoke-virtual {p0, v0}, Lcom/xingbook/ui/a/f;->addView(Landroid/view/View;)V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->q:Landroid/widget/ImageView;

    invoke-virtual {p0, v0}, Lcom/xingbook/ui/a/f;->addView(Landroid/view/View;)V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->r:Landroid/widget/ImageView;

    invoke-virtual {p0, v0}, Lcom/xingbook/ui/a/f;->addView(Landroid/view/View;)V

    return-void
.end method

.method private m()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->q:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->q:Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    :cond_0
    return-void
.end method


# virtual methods
.method public a()V
    .locals 0

    return-void
.end method

.method public a(Z)V
    .locals 3

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->q:Landroid/widget/ImageView;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    if-nez v0, :cond_0

    invoke-static {}, Landroid/hardware/Camera;->open()Landroid/hardware/Camera;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->o:Landroid/view/SurfaceHolder;

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setPreviewDisplay(Landroid/view/SurfaceHolder;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->startPreview()V

    if-eqz p1, :cond_1

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->b:Lcom/xingbook/ui/b/a;

    iget v1, p0, Lcom/xingbook/ui/a/f;->d:I

    const/4 v2, 0x5

    invoke-virtual {v0, v1, v2}, Lcom/xingbook/ui/b/a;->a(II)Z

    :cond_1
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0
.end method

.method public b()V
    .locals 0

    return-void
.end method

.method public b(Z)V
    .locals 0

    return-void
.end method

.method public c()V
    .locals 2

    invoke-super {p0}, Lcom/xingbook/ui/a/c;->c()V

    invoke-direct {p0}, Lcom/xingbook/ui/a/f;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->e:Landroid/content/Context;

    invoke-static {v0}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/c/n;->h()Lcom/xingbook/d/a;

    move-result-object v1

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->c:Lcn/a/a/b/b;

    check-cast v0, Lcn/a/a/b/d;

    invoke-virtual {v0}, Lcn/a/a/b/d;->b()I

    move-result v0

    invoke-virtual {v1, v0}, Lcom/xingbook/d/a;->j(I)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/a/f;->s:Landroid/graphics/Bitmap;

    invoke-direct {p0}, Lcom/xingbook/ui/a/f;->m()V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->s:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->r:Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->s:Landroid/graphics/Bitmap;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    :cond_0
    return-void
.end method

.method public c(Z)V
    .locals 4

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    iget-object v1, p0, Lcom/xingbook/ui/a/f;->v:Landroid/hardware/Camera$ShutterCallback;

    iget-object v2, p0, Lcom/xingbook/ui/a/f;->w:Landroid/hardware/Camera$PictureCallback;

    iget-object v3, p0, Lcom/xingbook/ui/a/f;->x:Landroid/hardware/Camera$PictureCallback;

    invoke-virtual {v0, v1, v2, v3}, Landroid/hardware/Camera;->takePicture(Landroid/hardware/Camera$ShutterCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;)V

    return-void
.end method

.method public d()V
    .locals 0

    invoke-super {p0}, Lcom/xingbook/ui/a/c;->d()V

    return-void
.end method

.method public e()V
    .locals 0

    invoke-super {p0}, Lcom/xingbook/ui/a/c;->e()V

    return-void
.end method

.method public f()V
    .locals 2

    const/4 v1, 0x0

    invoke-super {p0}, Lcom/xingbook/ui/a/c;->f()V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->q:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    iput-object v1, p0, Lcom/xingbook/ui/a/f;->u:Landroid/graphics/Bitmap;

    :cond_0
    iget-object v0, p0, Lcom/xingbook/ui/a/f;->s:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->s:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    iput-object v1, p0, Lcom/xingbook/ui/a/f;->s:Landroid/graphics/Bitmap;

    :cond_1
    iget-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->stopPreview()V

    iget-object v0, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->release()V

    iput-object v1, p0, Lcom/xingbook/ui/a/f;->p:Landroid/hardware/Camera;

    :cond_2
    return-void
.end method

.method public g()V
    .locals 0

    invoke-super {p0}, Lcom/xingbook/ui/a/c;->g()V

    invoke-virtual {p0}, Lcom/xingbook/ui/a/f;->removeAllViews()V

    return-void
.end method
